<template>
  <el-carousel
    :interval="2000"
    arrow="never"
    height="450px"
    indicator-position="none"
    ref="carousel"
    trigger
    type="card"
    
  >
    <el-carousel-item
      v-for="(img, index) in imgList"
      :key="index"
      @dblclick.native="goSolution(index)"
    >
      <img :src="img.url" width="100%" height="450px" />
    </el-carousel-item>
  </el-carousel>
</template>

<script>
export default {
  data() {
    return {
      imgList: [
        {
          url: require("../assets/small223204vne8N1627223524 (1).jpg"),
        },
        {
          url: require("../assets/small235638HnvjG1627314998.jpg"),
        },
        {
          url: require("../assets/wallhaven-4xw81o.jpg"),
        },
        {
          url: require("../assets/small231504xVYr71625411704 (1).jpg"),
        },
      ],
    };
  },
  methods: {
    goSolution(index) {
      console.log(index);
      this.$router.push("/Article/content");
    },
  },
};
</script>



<style>
.el-carousel__item:nth-child(2n) {
  background-color: #99a9bf;
}

.el-carousel__item:nth-child(2n + 1) {
  background-color: #d3dce6;
}
</style>